package com.wanho.java158.impl;

import com.wanho.java157.EmployeeVoMapper;
import com.wanho.java157.Orders;
import com.wanho.java157.OrdersMapper;
import com.wanho.java157.OrdersVoMapper;
import com.wanho.java157.vo.EmployeeVo;
import com.wanho.java157.vo.OrdersVo;
import com.wanho.java158.EmployeeService;
import com.wanho.java158.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService{
    @Autowired
    EmployeeVoMapper employeeVoMapper;



    @Override
    public List<EmployeeVo> select(String eid) {
        return employeeVoMapper.select(eid);
    }

    @Override
    public boolean delete(Integer id) {
      //先删另三表再删(mei
        employeeVoMapper.deleteRP(id);
        employeeVoMapper.deleteR(id);
        employeeVoMapper.deleteP(id);
        //
        return employeeVoMapper.delete(id);
    }

    @Override
    public boolean update(EmployeeVo employeeVo) {
        return employeeVoMapper.update(employeeVo);
    }

    @Override
    public boolean add(EmployeeVo employeeVo) {
        return employeeVoMapper.add(employeeVo);
    }
}